package com.xiaobai.provider;

import com.xiaobai.provider.response.ResponseResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class PaymentController {
    @Value("${server.port}")
    private String serverPort;

    @RequestMapping(value = "/payment/zk")
    public ResponseResult<User> paymentzk() {
        User user = new User();
        user.setAge(1);
        user.setName("TEST");
        return ResponseResult.success(user);
    }

    @RequestMapping(value = "/payment/zk1")
    public ResponseResult<String> paymentzk1() {
        return ResponseResult.fail(422, "出错了哦");
    }
}
